package com.zmn.oms.persistence.interfaces.remark;


import com.zmn.oms.model.entity.remark.OrderRemark;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface OrderRemarkDao {

    /**
     * 根据订单id和类型查询
     * @param orderId 订单id
     * @param type 类型
     * @return
     */
    OrderRemark findByOrderIdAndType(@Param("orderId") Long orderId, @Param("workId") Long workId, @Param("type") Integer type);

    /**
     * 根据订单id集合查询
     * @param orderIdList 订单id集合
     * @return 订单备注
     */
    List<OrderRemark> listOrderRemarkByOrderIdList(@Param("orderIdList") List<Long> orderIdList);

    /**
     * 通过条件删除
     * @param orderRemark
     */
    void deleteOrderRemarkByParams(OrderRemark orderRemark);

    /**
     * 录入
     * @param orderRemark
     */
    void insertOrderRemark(OrderRemark orderRemark);

    List<OrderRemark> listOrderRemarkByOrderIdListAndType(@Param("orderIdList") List<Long> orderIdList, @Param("type") Integer type);
}